﻿using System;
using System.Data;
using System.Configuration;
using System.Collections;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;
using System.Data.SqlClient;
using CSharpDesign.DAL;
using CSharpDesign.Scripts;
using CSharpDesign.BLL;

namespace CSharpDesign.Admin
{
    public partial class OrderChk : System.Web.UI.Page
    {
        SqlHelper data = new SqlHelper();
        public string OrderStite;
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!IsPostBack)
            {
                try
                {
                    string id = Request.QueryString["Orderid"].ToString();
                    OrderStite= OrderChkService.Select_Orderid(id);
                }
                catch (Exception ex)
                {
                    Alert.AlertAndRedirect(ex.Message, "OrderManger.aspx");
                }

            }

        }
        /// <summary>
        /// 修改订单状态
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        protected void Button1_Click(object sender, EventArgs e)
        {
            string id = Request.QueryString["Orderid"].ToString();
            try
            {
                OrderChkService.Update_OrderStiteod(id, OrderStite);
                Alert.AlertAndRedirect("操作成功", "OrderManger.aspx");
            }
            catch (Exception ex)
            {
                Alert.AlertAndRedirect(ex.Message, "OrderManger.aspx");
            }
        }

    }
}